import React from 'react';
import { createAppContainer, createSwitchNavigator,createStackNavigator,createBottomTabNavigator } from 'react-navigation';

import MainTabNavigator from './MainTabNavigator';
import LoginScreen from '../screens/LoginScreen';
import Register from '../screens/RegisterScreen';
import FindPasswordScreen from '../screens/FindPasswordScreen';
const MainStack = createBottomTabNavigator({
  ...MainTabNavigator
})
const loginStack = createStackNavigator({ 
  Login: LoginScreen,
  Register: Register,
  FindPassword:FindPasswordScreen
},{
  initialRouteName:'Login'
})
const AppNavigator = createAppContainer(createSwitchNavigator({
  // You could add another route here for authentication.
  // Read more at https://reactnavigation.org/docs/en/auth-flow.html
  Main: MainStack,
  LoginNavigator: loginStack
}, {
  initialRouteName: 'LoginNavigator'
}));
export default AppNavigator;